package com.eastfair.api;

import com.eastfair.core.base.R;
import com.eastfair.notice.dto.CommentQuery;
import com.eastfair.notice.dto.MsgSendDTO;
import com.eastfair.notice.vo.CommentVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 消息通知feign
 * @ClassName NoticeServiceFeign
 * @Description 消息通知feign
 * @Author liuxiaobai
 * @Date 2021/8/13 4:10 下午
 * @Version 1.0
 */
@FeignClient(value = "notice-core")
public interface NoticeServiceFeign {

    /**
     * 发送消息
     * @param sendDTO 全部必填-(projectId，exhibitionId，msgType，tempType，receive)
     *                站内信必填-(receiveType,receiveId,noticeType)
     */
    @PostMapping("/msgSend/send")
    void send(@RequestBody MsgSendDTO sendDTO);

    /**
     * 批量发送消息
     * @param sends 全部必填-(projectId，exhibitionId，msgType，tempType，receive)
     *                站内信必填-(receiveType,receiveId,noticeType)
     */
    @PostMapping("/msgSend/sendBatch")
    void sendBatch(@RequestBody List<MsgSendDTO> sends);

    /**
     * 获取评论回复列表
     * @param query subjectType、subjectIds、shortList
     * @return 评论回复vo
     */
    @PostMapping("/comment/queryList")
    R<List<CommentVO>> queryCommentList(@RequestBody CommentQuery query);
}
